<template>
  <div class="rounded shadow-xl h-full bg-black">
    <video
      ref="video"
      class="w-full h-full object-left"
      controls
      autoplay
      muted
    ></video>
  </div>
</template>

<script lang="ts" setup>
import { onMounted, ref } from "vue";
import { SrsRtcPlayerAsync } from "rtc-streamer";

const srs = new SrsRtcPlayerAsync();
const video = ref();

onMounted(() => {
  video.value.srcObject = srs.stream;
  srs.play(`webrtc://119.91.145.64/test/video?eip=119.91.148.64:7000`);
});
</script>
